// src/main.js
import { createApp } from 'vue'
import { createPinia } from 'pinia'
import App from './App.vue'
import piniaPluginPersistedstate from 'pinia-plugin-persistedstate';

// ✅ 正确引入 router
import router from './router' // 确保路径正确：src/router/index.js

const pinia = createPinia()
const app = createApp(App)
pinia.use(piniaPluginPersistedstate);
// ✅ 挂载插件
app.use(pinia)
app.use(router) // 现在 router 是定义好的实例

// ✅ 挂载根组件
app.mount('#app')